package com.cloud.security.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 当前在线会话
 *
 * @author yzj
 */
@Data
@Schema(name = "当前在线对象", description = "权限管理")
public class OnlineUser {

    @Schema(description = "会话编号")
    private String tokenId;

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "用户账户")
    private String userName;

    @Schema(description = "用户昵称")
    private String nickName;

    @Schema(description = "登录IP地址")
    private String ipaddr;

    @Schema(description = "登录设备")
    private String loginDevice;

    @Schema(description = "登录时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginTime;

}
